import { NgModule } from '@angular/core';

import { SharedModule } from '@shared';
import { RouteRoutingModule } from './routes-routing.module';
// dashboard pages
import { DashboardV1Component } from './dashboard/v1/v1.component';
import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component';
import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component';
import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component';
// passport pages
import { UserLoginComponent } from './passport/login/login.component';
import { UserRegisterComponent } from './passport/register/register.component';
import { UserRegisterResultComponent } from './passport/register-result/register-result.component';

import { CallbackComponent } from './callback/callback.component';
import { PasswordStrengthModule } from '../benshuo/util/password-strength/password-strength.module';

import { AngularSplitModule } from 'angular-split';
import { SchoolSelectComponent } from './benshuo/component/school/school-select/school-select.component';
import { AsyncAccountnValidatorDirective } from './passport/register/async-organization-validator.directive';
import { AsyncEmailValidatorDirective } from './passport/register/async-email.validator.directive';
import { SchoolViewComponent } from './benshuo/component/school/school-view/school-view.component';
import { SchoolDetailComponent } from './benshuo/component/school/school-detail/school-detail.component';
import { SchoolListComponent } from './benshuo/component/school/school-list/school-list.component';
import { UserViewComponent } from './benshuo/component/user-view/user-view.component';
import { UserListComponent } from './benshuo/component/user-list/user-list.component';
import { SchoolUserComponent } from './benshuo/component/school/school-user/school-user.component';
import { UserDetailComponent } from './benshuo/component/user-detail/user-detail.component';
import { MessagesViewComponent } from './benshuo/component/messages-view/messages-view.component';
import { MessagesListComponent } from './benshuo/component/messages-list/messages-list.component';
import { MessagesDetailComponent } from './benshuo/component/messages-detail/messages-detail.component';
import { MessagesShowComponent } from './benshuo/component/messages-show/messages-show.component';
import { MajorViewComponent } from './benshuo/component/major/major-view/major-view.component';
import { MajorListComponent } from './benshuo/component/major/major-list/major-list.component';

import { MajorDetailComponent } from './benshuo/component/major/major-detail/major-detail.component';
import { MajorSelectComponent } from './benshuo/component/major/major-select/major-select.component';
import { AsyncMajorNameValidatorDirective } from './benshuo/component/major/major-detail/async-organization-validator.directive';
import { SchoolShowComponent } from './benshuo/component/school/school-show/school-show.component';
import { SchoolShowCountComponent } from './benshuo/component/school/school-show/school-show-count.component';
import { G2BarModule } from '@delon/chart';

const COMPONENTS = [
  DashboardV1Component,
  DashboardAnalysisComponent,
  DashboardMonitorComponent,
  DashboardWorkplaceComponent,
  // passport pages
  UserLoginComponent,
  UserRegisterComponent,
  UserRegisterResultComponent,
  SchoolSelectComponent,
  AsyncAccountnValidatorDirective,
  AsyncEmailValidatorDirective,
  AsyncMajorNameValidatorDirective,
  CallbackComponent,
  MajorSelectComponent,
];
const COMPONENTS_NOROUNT = [];

@NgModule({
  imports: [SharedModule, RouteRoutingModule, PasswordStrengthModule, AngularSplitModule, G2BarModule],
  declarations: [
    ...COMPONENTS,
    ...COMPONENTS_NOROUNT,
    SchoolViewComponent,
    SchoolDetailComponent,
    SchoolListComponent,
    UserViewComponent,
    UserListComponent,
    UserDetailComponent,
    SchoolUserComponent,
    MessagesViewComponent,
    MessagesListComponent,
    MessagesDetailComponent,
    MessagesShowComponent,
    MajorViewComponent,
    MajorListComponent,
    MajorSelectComponent,
    MajorDetailComponent,
    SchoolShowComponent,
    SchoolShowCountComponent,
  ],
  entryComponents: COMPONENTS_NOROUNT,
  exports: [UserDetailComponent],
})
export class RoutesModule {}
